<!doctype html>



  


<html class="theme-next muse use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.1" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="Linux命令," />








  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.1.1" />






<meta name="description" content="&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Linux 下 find 命令在目录结构中搜索文件，并执行指定的操作。Linux 下 find 命令提供了相当多的查找条件，功能很强大。由于 find 具有强大的功能，所以它的选项也很多，其中大部分选项都值得我们花时间来了解一下。即使系统中含有网络文件系统( NFS)，find 命令在该文件系统中同样有">
<meta name="keywords" content="Linux命令">
<meta property="og:type" content="article">
<meta property="og:title" content="find 命令概览">
<meta property="og:url" content="https://hcldirgit.github.io/2017/09/03/2. Linux 命令/19. find 命令概览/index.html">
<meta property="og:site_name" content="失落的乐章">
<meta property="og:description" content="&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Linux 下 find 命令在目录结构中搜索文件，并执行指定的操作。Linux 下 find 命令提供了相当多的查找条件，功能很强大。由于 find 具有强大的功能，所以它的选项也很多，其中大部分选项都值得我们花时间来了解一下。即使系统中含有网络文件系统( NFS)，find 命令在该文件系统中同样有">
<meta property="og:locale" content="zh-Hans">
<meta property="og:updated_time" content="2017-09-01T08:33:59.914Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="find 命令概览">
<meta name="twitter:description" content="&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Linux 下 find 命令在目录结构中搜索文件，并执行指定的操作。Linux 下 find 命令提供了相当多的查找条件，功能很强大。由于 find 具有强大的功能，所以它的选项也很多，其中大部分选项都值得我们花时间来了解一下。即使系统中含有网络文件系统( NFS)，find 命令在该文件系统中同样有">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Muse',
    sidebar: {"position":"left","display":"post","offset":12,"offset_float":0,"b2t":false,"scrollpercent":false},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://hcldirgit.github.io/2017/09/03/2. Linux 命令/19. find 命令概览/"/>





  <title>find 命令概览 | 失落的乐章</title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  




<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
  ga('create', '85*****1', 'auto');
  ga('send', 'pageview');
</script>


  <script type="text/javascript">
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?87980c**************99ec5e26fb5";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>











  
  
    
  

  <div class="container sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">失落的乐章</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">技术面前，永远都是学生。</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-message">
          <a href="/message" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-external-link"></i> <br />
            
            留言
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
    <link itemprop="mainEntityOfPage" href="https://hcldirgit.github.io/2017/09/03/2. Linux 命令/19. find 命令概览/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="失落的乐章">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/0.png">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="失落的乐章">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">find 命令概览</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-09-03T01:57:34+08:00">
                2017-09-03
              </time>
            

            

            
          </span>

          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    <div class="post-body" itemprop="articleBody">

      
      

      
        <p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Linux 下 find 命令在目录结构中搜索文件，并执行指定的操作。Linux 下 find 命令提供了相当多的查找条件，功能很强大。由于 find 具有强大的功能，所以它的选项也很多，其中大部分选项都值得我们花时间来了解一下。即使系统中含有网络文件系统( NFS)，find 命令在该文件系统中同样有效，只要具有相应的权限。 在运行一个非常消耗资源的find命令时，很多人都倾向于把它放在后台执行，因为遍历一个大的文件系统可能会花费很长的时间(这里是指30G字节以上的文件系统)。</p>
<h2 id="1-命令格式"><a href="#1-命令格式" class="headerlink" title="1.命令格式"></a>1.命令格式</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">find pathname -options [-<span class="built_in">print</span> -<span class="built_in">exec</span> -ok ...]</div></pre></td></tr></table></figure>
<h2 id="2-命令功能"><a href="#2-命令功能" class="headerlink" title="2.命令功能"></a>2.命令功能</h2><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;用于在文件树中查找文件，并作出相应的处理</p>
<h2 id="3-命令参数"><a href="#3-命令参数" class="headerlink" title="3.命令参数"></a>3.命令参数</h2><ul>
<li>pathname：find命令所查找的目录路径。例如用.来表示当前目录，用/来表示系统根目录。 </li>
<li>-print：find命令将匹配的文件输出到标准输出。</li>
<li>-exec：find命令对匹配的文件执行该参数所给出的shell命令。相应命令的形式为’command’ {  } \;，注意{   }和\；之间的空格。</li>
<li>-ok：和-exec的作用相同，只不过以一种更为安全的模式来执行该参数所给出的shell命令，在执行每一个命令之前，都会给出提示，让用户来确定是否执行。</li>
</ul>
<h2 id="4-命令选项"><a href="#4-命令选项" class="headerlink" title="4.命令选项"></a>4.命令选项</h2><ul>
<li>-name   按照文件名查找文件。</li>
<li>-perm   按照文件权限来查找文件。</li>
<li>-prune  使用这一选项可以使find命令不在当前指定的目录中查找，如果同时使用-depth选项，那么-prune将被find命令忽略。</li>
<li>-user   按照文件属主来查找文件。</li>
<li>-group  按照文件所属的组来查找文件。</li>
<li>-mtime -n +n  按照文件的更改时间来查找文件， - n表示文件更改时间距现在n天以内，+ n表示文件更改时间距现在n天以前。find命令还有-atime和-ctime 选项，但它们都和-m time选项。</li>
<li>-nogroup  查找无有效所属组的文件，即该文件所属的组在/etc/groups中不存在。</li>
<li>-nouser   查找无有效属主的文件，即该文件的属主在/etc/passwd中不存在。</li>
<li>-newer file1 ! file2  查找更改时间比文件file1新但比文件file2旧的文件。</li>
<li>-type  查找某一类型的文件，诸如：</li>
<li>b - 块设备文件。</li>
<li>d - 目录。</li>
<li>c - 字符设备文件。</li>
<li>p - 管道文件。</li>
<li>l - 符号链接文件。</li>
<li>f - 普通文件。</li>
<li>-size n：[c] 查找文件长度为n块的文件，带有c时表示文件长度以字节计。-depth：在查找文件时，首先查找当前目录中的文件，然后再在其子目录中查找。</li>
<li>-fstype：查找位于某一类型文件系统中的文件，这些文件系统类型通常可以在配置文件/etc/fstab中找到，该配置文件中包含了本系统中有关文件系统的信息。</li>
<li>-mount：在查找文件时不跨越文件系统mount点。</li>
<li>-follow：如果find命令遇到符号链接文件，就跟踪至链接所指向的文件。</li>
<li>-cpio：对匹配的文件使用cpio命令，将这些文件备份到磁带设备中。</li>
</ul>
<h3 id="另外-下面三个的区别"><a href="#另外-下面三个的区别" class="headerlink" title="另外,下面三个的区别:"></a>另外,下面三个的区别:</h3><ul>
<li>-amin n   查找系统中最后N分钟访问的文件</li>
<li>-atime n  查找系统中最后n*24小时访问的文件</li>
<li>-cmin n   查找系统中最后N分钟被改变文件状态的文件</li>
<li>-ctime n  查找系统中最后n*24小时被改变文件状态的文件</li>
<li>-mmin n   查找系统中最后N分钟被改变文件数据的文件</li>
<li>-mtime n  查找系统中最后n*24小时被改变文件数据的文件</li>
</ul>
<h2 id="使用实例"><a href="#使用实例" class="headerlink" title="使用实例"></a>使用实例</h2><h3 id="实例1：查找指定时间内修改过的文件"><a href="#实例1：查找指定时间内修改过的文件" class="headerlink" title="实例1：查找指定时间内修改过的文件"></a>实例1：查找指定时间内修改过的文件</h3><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<strong>命令</strong></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">find -atime -2</div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<strong>输出</strong></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div></pre></td><td class="code"><pre><div class="line">[root@peidachang ~]<span class="comment"># find -atime -2</span></div><div class="line">.</div><div class="line">./logs/monitor</div><div class="line">./.bashrc</div><div class="line">./.bash_profile</div><div class="line">./.bash_history</div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<strong>说明</strong><br>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;查找 48 小时内修改过的文件</p>
<h3 id="实例2：根据关键字查找"><a href="#实例2：根据关键字查找" class="headerlink" title="实例2：根据关键字查找"></a>实例2：根据关键字查找</h3><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<strong>命令</strong></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">find . -name <span class="string">"*.log"</span></div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<strong>输出</strong></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div></pre></td><td class="code"><pre><div class="line">[root@localhost <span class="built_in">test</span>]<span class="comment"># find . -name "*.log" </span></div><div class="line">./log_link.log</div><div class="line">./log2014.log</div><div class="line">./test4/log3-2.log</div><div class="line">./test4/log3-3.log</div><div class="line">./test4/log3-1.log</div><div class="line">./log2013.log</div><div class="line">./log2012.log</div><div class="line">./log.log</div><div class="line">./test5/log5-2.log</div><div class="line">./test5/log5-3.log</div><div class="line">./test5/log.log</div><div class="line">./test5/log5-1.log</div><div class="line">./test5/test3/log3-2.log</div><div class="line">./test5/test3/log3-3.log</div><div class="line">./test5/test3/log3-1.log</div><div class="line">./test3/log3-2.log</div><div class="line">./test3/log3-3.log</div><div class="line">./test3/log3-1.log</div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<strong>说明</strong><br>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;在当前目录查找以 .log 结尾的文件。“.” 代表当前目录</p>
<h3 id="实例3：按照目录或文件的权限来查找文件"><a href="#实例3：按照目录或文件的权限来查找文件" class="headerlink" title="实例3：按照目录或文件的权限来查找文件"></a>实例3：按照目录或文件的权限来查找文件</h3><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<strong>命令</strong></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">find /opt/soft/<span class="built_in">test</span>/ -perm 777</div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<strong>输出</strong></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line">[root@localhost <span class="built_in">test</span>]<span class="comment"># find /opt/soft/test/ -perm 777</span></div><div class="line">/opt/soft/<span class="built_in">test</span>/log_link.log</div><div class="line">/opt/soft/<span class="built_in">test</span>/test4</div><div class="line">/opt/soft/<span class="built_in">test</span>/test5/test3</div><div class="line">/opt/soft/<span class="built_in">test</span>/test3</div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<strong>说明</strong><br>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;查找 /opt/soft/test/ 目录下，权限为 777 的文件</p>
<h3 id="实例4：按类型查找"><a href="#实例4：按类型查找" class="headerlink" title="实例4：按类型查找"></a>实例4：按类型查找</h3><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<strong>命令</strong></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">find . -<span class="built_in">type</span> f -name <span class="string">"*.log"</span></div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<strong>输出</strong></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div></pre></td><td class="code"><pre><div class="line">[root@localhost <span class="built_in">test</span>]<span class="comment"># find . -type f -name "*.log"</span></div><div class="line">./log2014.log</div><div class="line">./test4/log3-2.log</div><div class="line">./test4/log3-3.log</div><div class="line">./test4/log3-1.log</div><div class="line">./log2013.log</div><div class="line">./log2012.log</div><div class="line">./log.log</div><div class="line">./test5/log5-2.log</div><div class="line">./test5/log5-3.log</div><div class="line">./test5/log.log</div><div class="line">./test5/log5-1.log</div><div class="line">./test5/test3/log3-2.log</div><div class="line">./test5/test3/log3-3.log</div><div class="line">./test5/test3/log3-1.log</div><div class="line">./test3/log3-2.log</div><div class="line">./test3/log3-3.log</div><div class="line">./test3/log3-1.log</div><div class="line">[root@localhost <span class="built_in">test</span>]<span class="comment">#</span></div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<strong>说明</strong><br>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;查找当前目录，以 .log 结尾的普通文件</p>
<h3 id="实例5：查找当前所有目录并排序"><a href="#实例5：查找当前所有目录并排序" class="headerlink" title="实例5：查找当前所有目录并排序"></a>实例5：查找当前所有目录并排序</h3><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<strong>命令</strong></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">find .-<span class="built_in">type</span> d |sort</div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<strong>输出</strong></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div></pre></td><td class="code"><pre><div class="line">[root@localhost <span class="built_in">test</span>]<span class="comment"># find . -type d | sort</span></div><div class="line">.</div><div class="line">./scf</div><div class="line">./scf/bin</div><div class="line">./scf/doc</div><div class="line">./scf/lib</div><div class="line">./scf/service</div><div class="line">./scf/service/deploy</div><div class="line">./scf/service/deploy/info</div><div class="line">./scf/service/deploy/product</div><div class="line">./test3</div><div class="line">./test4</div><div class="line">./test5</div><div class="line">./test5/test3</div><div class="line">[root@localhost <span class="built_in">test</span>]<span class="comment">#</span></div></pre></td></tr></table></figure>
<h3 id="实例6：按大小查找文件"><a href="#实例6：按大小查找文件" class="headerlink" title="实例6：按大小查找文件"></a>实例6：按大小查找文件</h3><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<strong>命令</strong></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">find . -size +1000c -<span class="built_in">print</span></div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<strong>输出</strong></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div></pre></td><td class="code"><pre><div class="line">[root@localhost <span class="built_in">test</span>]<span class="comment">#  find . -size +1000c -print</span></div><div class="line">.</div><div class="line">./test4</div><div class="line">./scf</div><div class="line">./scf/lib</div><div class="line">./scf/service</div><div class="line">./scf/service/deploy</div><div class="line">./scf/service/deploy/product</div><div class="line">./scf/service/deploy/info</div><div class="line">./scf/doc</div><div class="line">./scf/bin</div><div class="line">./log2012.log</div><div class="line">./test5</div><div class="line">./test5/test3</div><div class="line">./test3</div><div class="line">[root@localhost <span class="built_in">test</span>]<span class="comment">#</span></div></pre></td></tr></table></figure>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<strong>说明</strong></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;查找当前目录大于1K的文件</p>

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/Linux命令/" rel="tag"># Linux命令</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2017/09/03/2. Linux 命令/18. Linux 命令- locate/" rel="next" title="Linux 命令- locate">
                <i class="fa fa-chevron-left"></i> Linux 命令- locate
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2017/09/03/2. Linux 命令/26. 用 SecureCRT 来上传和下载文件/" rel="prev" title="用 SecureCRT 来上传和下载文件">
                用 SecureCRT 来上传和下载文件 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          
  <div class="comments" id="comments">
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="/images/0.png"
               alt="失落的乐章" />
          <p class="site-author-name" itemprop="name">失落的乐章</p>
           
              <p class="site-description motion-element" itemprop="description">失落的乐章的Blog</p>
          
        </div>
        <nav class="site-state motion-element">

          
            <div class="site-state-item site-state-posts">
              <a href="/">
                <span class="site-state-item-count">627</span>
                <span class="site-state-item-name">日志</span>
              </a>
            </div>
          

          

          
            
            
            <div class="site-state-item site-state-tags">
              <a href="/tags/index.html">
                <span class="site-state-item-count">38</span>
                <span class="site-state-item-name">标签</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
            
              <span class="links-of-author-item">
                <a href="https://github.com/hcldirgit" target="_blank" title="GitHub">
                  
                    <i class="fa fa-fw fa-github"></i>
                  
                  GitHub
                </a>
              </span>
            
          
        </div>

        
        

        
        

        


      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#1-命令格式"><span class="nav-number">1.</span> <span class="nav-text">1.命令格式</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2-命令功能"><span class="nav-number">2.</span> <span class="nav-text">2.命令功能</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#3-命令参数"><span class="nav-number">3.</span> <span class="nav-text">3.命令参数</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#4-命令选项"><span class="nav-number">4.</span> <span class="nav-text">4.命令选项</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#另外-下面三个的区别"><span class="nav-number">4.1.</span> <span class="nav-text">另外,下面三个的区别:</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#使用实例"><span class="nav-number">5.</span> <span class="nav-text">使用实例</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#实例1：查找指定时间内修改过的文件"><span class="nav-number">5.1.</span> <span class="nav-text">实例1：查找指定时间内修改过的文件</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#实例2：根据关键字查找"><span class="nav-number">5.2.</span> <span class="nav-text">实例2：根据关键字查找</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#实例3：按照目录或文件的权限来查找文件"><span class="nav-number">5.3.</span> <span class="nav-text">实例3：按照目录或文件的权限来查找文件</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#实例4：按类型查找"><span class="nav-number">5.4.</span> <span class="nav-text">实例4：按类型查找</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#实例5：查找当前所有目录并排序"><span class="nav-number">5.5.</span> <span class="nav-text">实例5：查找当前所有目录并排序</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#实例6：按大小查找文件"><span class="nav-number">5.6.</span> <span class="nav-text">实例6：按大小查找文件</span></a></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2017</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">失落的乐章</span>
</div>


<div class="powered-by">
  由 <a class="theme-link" href="https://hexo.io">Hexo</a> 强力驱动
</div>

<div class="theme-info">
  主题 -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Muse
  </a>
</div>


        

        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.1"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.1"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.1"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.1"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.1"></script>



  


  




	





  





  





  






  





  

  

  

  

  

  

</body>
</html>
